#!/bin/bash

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"/../..

ln -fs $ROOT_DIR/project/config/production/nginx/delivery_address_format_system.conf /usr/local/nginx/conf/conf.d/delivery_address_format_system
/usr/local/nginx/sbin/nginx -s reload

/bin/bash $ROOT_DIR/project/tool/dep_build.sh link
/usr/bin/php $ROOT_DIR/public/cli.php migrate:install
/usr/bin/php $ROOT_DIR/public/cli.php migrate

rm -rf /var/www/delivery_address_format_system/view/blade/*
